a361760605b5b2cde37e2b562a5ef493de508f75
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 8"""
4  date="2024-11-15T17:48:08Z"
5  content="""
6 Did same memory optimisation for the versioned case, and the results are
7 striking! Running the command until it had made 45 API requests, it was
8 using 592788 kb of memory. Now it uses only 110968 kb.
9
10 Of that, about 78900 kb are used at startup, so it grew 29836 kb.
11 At that point, it has gathered 23537 changes. So about 1 kb is used per
12 change. That seems a bit more memory than really should be needed,
13 each change takes about 75 bytes of data, eg:
14
15         "y3RixvrmLvr1oWJ7meEa4vWK6B.C.aad",3340,"dandisets/000003/draft/dandiset.jsonld",2021-09-28 02:12:39 UTC
16
17 I did try some further memory optimisation, making it avoid storing the
18 same filename repeatedly in memory when gathering versioned changes. Which
19 oddly didn't save any memory.
20
21 Memory profiling might let this be improved further, but needing 1 gb of
22 memory to import a million changes to files doesn't seem too bad.
23
24 Update: Did some memory profiling, nothing stuck out as badly wrong.
25 Lists and tuples are using as much memory as anything.
26 """]]